<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateSuningApiLogTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('suning_api_logs', function (Blueprint $table) {
            $table->id();
            $table->string('from', 20)->nullable();
            $table->string('req_url', 129);
            $table->string('req_method', 10)->default('');
            $table->string('req_param', 256)->nullable();
            $table->text('req_body')->nullable();
            $table->integer('resp_status')->default(0);
            $table->text('resp_body')->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('suning_api_logs');
    }
}
